import request from '@/utils/request'

// 获取压力监测量下拉列表
export function getMonitoringList() {
  return request({
    url: '/dispatch/pressure/report/monitoringList',
    method: 'get'
  })
}

// 合格率日报
export function getDailyPassRate(params) {
  return request({
    url: '/dispatch/pressure/report/daily-pass-rate',
    method: 'get',
    params
  })
}

// 合格率月报
export function getMonthlyPassRate(params) {
  return request({
    url: '/dispatch/pressure/report/monthly-pass-rate',
    method: 'get',
    params
  })
}

// 均值报表
export function getAvgReport(params) {
  return request({
    url: '/dispatch/pressure/report/avg',
    method: 'get',
    params
  })
}

// 实时报表
export function getRealtimeReport(params) {
  return request({
    url: '/dispatch/pressure/report/realtime',
    method: 'get',
    params
  })
}

// 日报导出
export function exportDailyPassRate(params) {
  return request({
    url: '/dispatch/pressure/report/daily-pass-rate/export',
    method: 'post',
    params,
    responseType: 'blob'
  })
}

// 月报导出
export function exportMonthlyPassRate(params) {
  return request({
    url: '/dispatch/pressure/report/monthly-pass-rate/export',
    method: 'post',
    params,
    responseType: 'blob'
  })
}

// 均值报表导出
export function exportAvgReport(params) {
  return request({
    url: '/dispatch/pressure/report/avg/export',
    method: 'post', 
    params,
    responseType: 'blob'
  })
}

// 实时报表导出
export function exportRealtimeReport(params) {
  return request({
    url: '/dispatch/pressure/report/realtime/export',
    method: 'post',
    params,
    responseType: 'blob'
  })
}